source—value you're looking for; sorted key vector—sorted row or column of keys; return values vector—row or column of values to be returned when source matches a key.
lookup creates a block the same size and shape as source and the same type as return values vector.